<?php
/**
 * Created by PhpStorm.
 * User: Zhoujinda
 * Date: 2016/3/15
 * Time: 18:42
 */
namespace Api\Domain;

use Shop\Api\StorePromotionApi;

class StorePromotionDomain extends BaseDomain{
    protected $business_code = "storePromotion";

    protected $allowType = array("json", "rss", "html");

    /**
     * 获取店铺优惠信息
     */
    public function getInfo(){

        if(IS_POST){
            $this -> checkVersion(100);
            addLog("StorePromotion/getInfo",$_GET,$_POST,$this->client_id."调用店铺优惠信息查询接口");

            $store_id = $this->_post('store_id','','店铺ID缺失');

            $result = apiCall(StorePromotionApi::GET_INFO,array(array('store_id'=>$store_id)));
            if($result['status']){
                $this->apiReturnSuc($result['info']);
            }else{
                $this->apiReturnErr('查询失败');
            }



        }else{
            $this->apiReturnErr('只支持POST请求');
        }

    }
}